//
//  DEFINE.h
//  海角音乐
//
//  Created by dllo on 15/8/6.
//  Copyright (c) 2015年 杨元石. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#ifndef _____DEFINE_h
#define _____DEFINE_h




#define isRetina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)


// 比例
#define ADJUSTWIDTH [[UIScreen mainScreen]bounds].size.width/375
#define ADJUSTHEIGHT [[UIScreen mainScreen]bounds].size.height /667












// MV
#define MVDataUrl @"http://api.dongting.com/channel/channel/mvs?page=1&size=5&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"

#define DetailMv @"http://api.dongting.com/song/video/2000820"

// 猜你嘻哈
#define GuessYouLike @"http://online.dongting.com/recomm/song_list?moduleId=2208&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"



// 排行榜
#define RankMusicUrl @"http://v1.ard.tj.itlily.com/ttpod?a=getnewttpod&id=281&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"


// 歌手
#define SingerUrl @"http://v1.ard.tj.itlily.com/ttpod?a=getnewttpod&id=46&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"


// zhuanji
#define zhuanjie @"http://api.dongting.com/song/singer/50530/albums?page=1&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"

// MV
#define MVPlayer @"http://api.dongting.com/song/singer/50530/videos?page=1&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"


// sings
#define Sings_url @"http://api.dongting.com/song/singer/50530/songs?page=1&size=50&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"



// 分类
#define CategoryMusicUrl @"http://fm.api.ttpod.com/channellist?image_type=240_200&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"


// 推荐地址
#define RecommedUrl @"http://online.dongting.com/recomm/recomm_modules"

// 详情图地址新歌
#define Detailpic_url @"http://online.dongting.com/recomm/new_songlists?app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"

// 华语新歌
#define AddressIdOfChinaUrl @"http://v1.ard.q.itlily.com/share/user_timeline?msg_ids=%5B300002376%5D"
// 欧美地址
#define AddressIdOfEuropeUrl @"http://v1.ard.q.itlily.com/share/user_timeline?msg_ids=%5B300002375%5D"
// 日本地址
#define AddressIdOfJanpanUrl @"http://v1.ard.q.itlily.com/share/user_timeline?msg_ids=%5B300002386%5D"

// 新歌三个id
#define NewMusicAddress @"http://online.dongting.com/recomm/new_songlists?app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"

// 新歌首发炎亚纶
#define ListNewMusic @"http://online.dongting.com/recomm/new_albums?page=1&size=30"

// 大家都在听
#define AllPeopleListen @"http://api.dongting.com/channel/channel/0/songs?size=50&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"


// Radio
#define RadioDataUrl @"http://fm.api.ttpod.com/radiolist?image_type=240_200&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"



//******************************************

// 发现
#define FindMusic @"http://v1.ard.q.itlily.com/share/get_celebrities_by_cat?app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=8ab7f0f87beab7e9bd24db8751cdfb44a3f8ba8f&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=Vb8Xammx8HcDAJ6K4SjYk1ID&alf=201200&bundle_id=com.ttpod.music"


// 电态
#define RadioUrl @"http://fm.api.ttpod.com/radiolist?image_type=240_200&app=ttpod&v=v7.9.4.2015052918&uid=&mid=iPhone5C&f=f320&s=s310&imsi=&hid=&splus=8.3&active=1&net=2&openudid=c444c4cf07f2a200e90263cc039b29b6634cbb49&idfa=EE9C3C6E-4AF6-4C81-B2C0-1A80104187A0&utdid=VdV3FoVXxdcDAFpZJW9INfoX&alf=201200&bundle_id=com.ttpod.music"

// 内容
#define ContentUrlOfRadio @"http://fm.api.ttpod.com/vipradiosong?userid=0000001&num=150&tagid=39"




//获取系统版本
#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]
#define CurrentSystemVersion [[UIDevice currentDevice] systemVersion]


//获取屏幕 宽度、高度
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)
#define SCREENFRAME ([UIScreen mainScreen].bounds)



// Prints the current method's name. (打印当前方法名字)
#define ITTDPRINTMETHODNAME() ITTDPRINT(@"%s", __PRETTY_FUNCTION__)


// 首次启动判断
#define First_Launched @"firstLaunch"


// ios 7判断
#define IsIOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >=7.0 ? YES : NO)





// 是否IPad
#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)

// 加载本地图片宏：
#define LOADIMAGE(file,type) [UIImage imageWithContentsOfFile:[[NSBundle mainBundle]pathForResource:file ofType:type]]

// rgb颜色转换（16进制->10进制）

#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]







//带有RGBA的颜色设置
#define COLOR(R, G, B, A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]

//背景色
#define BACKGROUND_COLOR [UIColor colorWithRed:242.0/255.0 green:236.0/255.0 blue:231.0/255.0 alpha:1.0]

//清除背景色
#define CLEARCOLOR [UIColor clearColor]


//G－C－D
#define BACK(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block)
#define MAIN(block) dispatch_async(dispatch_get_main_queue(),block)



#endif
